<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.connection.jdbconnection"%>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<% HttpSession hs=request.getSession(false); 
if(hs.getAttribute("userName")==null)
{

response.sendRedirect("Login.jsp");
return ;
}
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<body>
	<form>
		<%
    /*  String sid;
     String sname;
    String fname; 
     String dob;
     String address;
     String course;
     String issuedate;
     String validuntile */;
     
   Statement st ;
        ResultSet rs ;
        Connection con = null;
        String name=request.getParameter("name");
        
              
        try {
            jdbconnection db=new jdbconnection();
            st=db.jdbConnection();
            String sql = "select * from studentform ";
            System.out.println(sql);
            rs=st.executeQuery(sql);
           
            int count=0;
            while(rs.next())
            {
            count++;
            }
            
            float pages=count/8.0f;
           
           int  d=(int)  Math.ceil(pages);
            rs.beforeFirst();
		 %>
		<%       for(int j=1;j<=d;j++)
       {%>
		<div
			style="margin-top: 20px; margin-bottom: 40px; width: 970px; height: 1370px; border-style: groove;">
			<% int i=1;          
                   
            while (rs.next()) {

                        String sid=rs.getString("student_id");
                         String sname=rs.getString("sname");
                        String fname=rs.getString("fname");
                        String dob=rs.getString("dob");
                        String gender=rs.getString("gender");
                        String address=rs.getString("address");
                        String contact=rs.getString("contact");
                        String emailid=rs.getString("emailid");
                        String photo=rs.getString("upload");
                        String course=rs.getString("course");
                        String issuedate=rs.getString("issuedate");
                        String validuntill=rs.getString("validuntile");
                   
                                          
                         
  
		 %>

			<div
				style="width: 470px; height: 320px; border-style: groove; float: left; margin-bottom: 10px; margin-left: 7px; margin-top: 8px;">

				<div style="width: 470px; height: 100px;" align="center">
					<font color="blue"
						style="font-family: serif; font-style: normal; text-shadow: purple; font-size: 29px; width: 100%;"><b>HI-REL
							INFO GENESIS CENTRE <br>
					</b> </font> <font color="blue" style="font-size: 14px;">42/7 J.L.N.
						Road Tagore Town Alld. Phone:-0532-2467260, 9389116029<br>
					</font> <font color="blue" style="font-size: 14px">43/33 T. B.
						Sapru Marg, Civil Lines, Alld. Phone:-0532-2260035, 9307883434<br>
					</font> <font color="blue" style="font-size: 12px"><b>Accredited
							Centre</b><br> </font> <font color="blue" style="font-size: 14px;"><b>NIELIT
							(Formerly DOEACC Society) & PTU (Punjab Technical University)</b> </font>

				</div>
				<hr style="width: 460px; height: 1px; background-color: blue">
				<div style="border-color: black; border: 2px;">
					<div
						style="width: 100px; height: 110px; border-style: groove; float: right; margin-right: 10px;"></div>
					<div
						style="float: left; margin-left: 5px; width: 120px; border: 2px;">
						<font color="blue" style="font-size: 16px;"><b>
								Enrollment No:<br> Name:<br> Father's Name:<br>
								Course: <br> Address:<br> Issue Date:<br> Valid
								Date:<br>
						</b> </font>



					</div>

					<div>

						<%=sid %><br>
						<%=sname %><br>
						<%=fname %>
						<br>
						<%=course %><font color="blue"
							style="font-size: 16px; float: none;"><b>
								&nbsp;&nbsp;&nbsp; Batch:</b> </font>2nd<br>
						<%=address %><br>
						<%=issuedate %><br>
						<%=validuntill %><br>
						<%=validuntill %><br> <font color="blue"
							style="float: right; margin-right: 5px;"><b>Auth.
								Signature</b> </font>
					</div>


				</div>


			</div>
			<%
		if(i==8)
		break;
		
		
		      i++;
		}
		
	
		
		
		 %>

		</div>



		<%
}	
	    }
		catch (Exception e) {
		 e.printStackTrace();
		}
    
    
     %>




	</form>



</body>
</html>
